<template>
    <div class="contract-info-container">
      <van-nav-bar
  title="签约信息"
  left-text="返回"
  left-arrow
  @click-left="onClickLeft"
/>
      <!-- 用户信息 -->
      <van-cell-group>
        <van-cell
          icon="person"
          :title="`${store.useStore.userName}  ${store.useStore.sex} ${store.useStore.age}岁`"
          :description="''"
        />
      </van-cell-group>
      <!-- 团队信息 -->
      <van-cell-group>
        <van-cell
          icon="group"
          title="中心医院慢病管理团队"
          :description="`所属机构: ${team.organization} \n签约人数: ${team.signCount}人`"
        >
          <template #extra>
            <van-rate v-model="team.rating" readonly />
            <span>{{ team.rating }}</span>
          </template>
        </van-cell>
        <van-tag  type="primary">{{ store.useStore.disease }}</van-tag>
      </van-cell-group>
      <!-- 主管医生信息 -->
      <div class="doctor-info">
        <h3 class="doctor-title">主管医生</h3>
        <van-cell
          icon="doctor"
          :title="doctor.name"
          :description="doctor.position"
        />
        <p class="doctor-desc">
          毕业于{{ doctor.graduateSchool }}，在{{ doctor.hospital }}从事临床医学内科专业{{ doctor.workingYears }}余年，
          熟练掌握门诊常见病和多发病的诊断和治疗，包括风湿以及类风湿病、老年病、慢性病的诊断治疗。
        </p>
        <p class="doctor-specialty">
          专业特长: <br />
          {{ doctor.specialty }}
        </p>
      </div>
      <!-- 操作按钮 -->
      <div class="action-buttons">
        <van-button type="default" icon="chat-o" color="blue" block>发送消息</van-button>
        <van-button type="default" icon="phone-o" color="green" block>拨打电话</van-button>
      </div>
    </div>
  </template>
  
  <script setup lang="ts">
  import { useCounterStore } from '@/stores/counter';
  const store = useCounterStore();
  const onClickLeft = () => history.back();
  // 模拟用户信息
  const user = {
    name: '王谢',
    sex: '男',
    age: 68
  };
  // 模拟团队信息
  const team = {
    organization: 'xx区xx街道卫生服务站',
    signCount: 250,
    rating: 4.0,
    tags: ['高血压', '糖尿病']
  };
  // 模拟主管医生信息
  const doctor = {
    name: '张天启',
    position: '全科医师',
    graduateSchool: 'xx医学院',
    hospital: 'xx医学院第一附属医院',
    workingYears: 30,
    specialty: `门诊常见病和多发病的诊断和治疗，内科常见病，
    呼吸系统、消化系统、内分泌系统及糖尿病、高血压病、神经系统常见病及脑梗死，风湿以及类风湿病、老年病、慢性病的诊断治疗。`
  };
  </script>
  
  <style scoped>
  .contract-info-container {
    padding: 16px;
  }
  .doctor-info {
    margin-top: 16px;
  }
  .doctor-title {
    font-size: 20px;
    margin-bottom: 8px;
  }
  .doctor-desc,
  .doctor-specialty {
    line-height: 1.6;
  }
  .action-buttons {
    margin-top: 16px;
  }
  </style>